#ifndef XBOXCONTROLLER_H
#define XBOXCONTROLLER_H

#include "yaef_input.h"

#include <Windows.h>
#include <Xinput.h>

class XBoxController : public InputDevice
{
  Q_OBJECT

  XINPUT_STATE _controllerState;
  int _controllerNum;
  DWORD _currentPacket;
public:
  explicit XBoxController(int playerNumber,QObject *parent = 0);

  void init(OIS::InputManager *mgr);
  void capture();

private:
  XINPUT_STATE getState();
  bool isConnected();
  void vibrate(int leftVal=0, int rightVal=0);


};

#endif // XBOXCONTROLLER_H
